-- ----------------------------- 2023-06-27 add by gaozq--------------begin

-- 建表语句
CREATE TABLE T_LIMS_PERSON_EDU_EXPERIENCE( 
    ID NUMBER NOT NULL,
    PERSONID NUMBER NULL,
    STARTTIME DATE NULL,
    ENDTIME DATE NULL,
    SCHOOL VARCHAR2(100)  NULL,
    ADDRESS VARCHAR2(300)  NULL,
    MAJOR VARCHAR2(250)  NULL,
    EDUCATION VARCHAR2(60)  NULL,
    CREATEDBYID VARCHAR2(36)  NULL,
    CREATEDBYNAME VARCHAR2(60)  NULL,
    CREATEDTIME DATE NULL,
    CREATEDBYORGID VARCHAR2(36)  NULL,
    CREATEDBYORGNAME VARCHAR2(270)  NULL,
    REMARK VARCHAR2(300)  NULL
 );
COMMENT ON TABLE T_LIMS_PERSON_EDU_EXPERIENCE IS '人员学习经历表';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.ID IS '主键';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.PERSONID IS '人员ID';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.STARTTIME IS '开始时间';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.ENDTIME IS '结束时间';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.SCHOOL IS '学校';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.ADDRESS IS '学校地址';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.MAJOR IS '所学专业';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.EDUCATION IS '最高学历';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYID IS '制单人编码';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYNAME IS '制单人名称';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDTIME IS '制单时间';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYORGID IS '制单人单位编码';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYORGNAME IS '制单人单位名称';
COMMENT ON COLUMN T_LIMS_PERSON_EDU_EXPERIENCE.REMARK IS '备注';

ALTER TABLE T_LIMS_PERSON_EDU_EXPERIENCE ADD CONSTRAINT PK_LIMS_PERSON_EDU_EXPERIENCE PRIMARY KEY (ID);

-- 旧版审计跟踪，跟踪配置变更语句

INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','ID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','PERSONID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','STARTTIME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','ENDTIME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','SCHOOL','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','ADDRESS','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','MAJOR','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','EDUCATION','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYNAME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDTIME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYORGID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYORGNAME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','REMARK','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
COMMIT;

INSERT INTO T_CORE_AT_CONFIG (ID, AUDITTRAIL, CREATEDBYID, CREATEDBYNAME, CREATEDTIME, CREATEDBYORGID, CREATEDBYORGNAME)
VALUES ('T_LIMS_PERSON_EDU_EXPERIENCE', '1', 'gaozq', '高志强', CURRENT_TIMESTAMP, 'L005', '五行业');

-- 审计跟踪V2，跟踪配置变更语句

INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','ID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','PERSONID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','STARTTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','ENDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','SCHOOL','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','ADDRESS','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','MAJOR','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','EDUCATION','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYORGID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','CREATEDBYORGNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_EDU_EXPERIENCE','REMARK','1');
COMMIT;

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_PERSON_EDU_EXPERIENCE', '人员学习经历表', 'service', '1');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.SERVICE_NAME', '人员学习经历表', '人员学习经历表', 'zh-CN', '人员学习经历表');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.ID', '人员学习经历表的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.PERSONID', '人员学习经历表的人员ID', '人员ID', 'zh-CN', '人员ID');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.STARTTIME', '人员学习经历表的开始时间', '开始时间', 'zh-CN', '开始时间');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.ENDTIME', '人员学习经历表的结束时间', '结束时间', 'zh-CN', '结束时间');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.SCHOOL', '人员学习经历表的学校', '学校', 'zh-CN', '学校');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.ADDRESS', '人员学习经历表的学校地址', '学校地址', 'zh-CN', '学校地址');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.MAJOR', '人员学习经历表的所学专业', '所学专业', 'zh-CN', '所学专业');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.EDUCATION', '人员学习经历表的最高学历', '最高学历', 'zh-CN', '最高学历');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYID', '人员学习经历表的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYNAME', '人员学习经历表的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDTIME', '人员学习经历表的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYORGID', '人员学习经历表的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.CREATEDBYORGNAME', '人员学习经历表的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('T_LIMS_PERSON_EDU_EXPERIENCE.REMARK', '人员学习经历表的备注', '备注', 'zh-CN', '备注');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.EDUEXPERIENCES.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.EDUEXPERIENCES.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.EDUEXPERIENCES.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.EDUEXPERIENCES.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.EDUEXPERIENCES.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');

-- 创建菜单语句
INSERT INTO T_CORE_MENU (ID, MENUNAME, HREF, PARENTID, ORDERNO, ICON, MENUINITNAME)
VALUES ('eduexperiences', '学习经历', '/secure/basemodule/rm/persons/person-edu-experiences/page/edit-list', 'null', 'eduexperiences', 'null', '学习经历');

INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_PERSON_EDU_EXPERIENCE', '0', '0');


COMMIT;

-- ----------------------------- 2023-06-27 add by gaozq------------end